import { ExclamationCircleOutlined } from '@ant-design/icons';
import { Modal } from 'antd';
import './index.scss';

const { confirm } = Modal;


const DeleteConfirm = (props) => {
  confirm({
    title: props?.title ? props.t(props?.title) : props.t('common.deleteMsg'),
    icon: <ExclamationCircleOutlined/>,
    className: `confirm-container`,
    content: props?.content && props.t(props?.content),
    okText: props.t('common.confirm'),
    cancelText: props.t('common.cancel'),
    onOk: props?.onOk && (()=> props?.onOk?.()),
    onCancel: props?.onCancel && (()=> props?.onCancel?.())
  });
};
export default DeleteConfirm;
